<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
    <title></title>
    <!--<script type="text/javascript" src="js/dom.js"></script>-->
    <!--<script type="text/javascript" src="js/dom-fix.js"></script>
    <script type="text/javascript" src="js/dom-all.js"></script>-->
    <script type="text/javascript" src="../../../lib/jquery-1.8.3.js"></script>
</head>
<body>
    <div id="test1" style="width:200px; height: 200px; border:1px solid #000;"></div>
<br>
    <input type="checkbox" name="" id="test2">
    <input type="text" name="" id="test3">
    <a id="test4" href="http://www.baidu.com">百度test4</a>

    <a href="#" id="test5" onclick="alert([this.href,this.getAttribute('href',2)])">aaa</a>
    <script type="text/javascript">
        /**
         * 1.添加正常的属性：title
         * 直接调用：el.setAttribute(name,value);
         */


        /**
         * 2.添加类似于checked这种需要html上作出改变的属性
         * QW:el.name=value;
         * el.setAttribute('checked','checked');
         * el.setAttribute('readOnly','readOnly');
         */

        /**
         * 3.传入null值/""/undefined等特殊值
         * fruit的作法：removeAttribute
         */

        /**
         *
         */

    </script>
</body>
</html>